package factory;

import game.Board;
import game.Game;
import game.GameRules;
import game.GridBoard;
import game.MoveObtainer;
import game.SimulationMoveObtainer;
import game.TTTGameRules;
import game.TTTMoveObtainerImplementor;

public class TTTGameFactory extends GameFactory
{
	@Override
	public Game createGame(String name, int numPlayers, int numMoves)
	{
		int effectiveNumMoves = Math.min(9, numMoves);
		return new Game(name, numPlayers, effectiveNumMoves);
	}

	@Override
	public Board createBoard()
	{
		return new GridBoard(3, 3);
	}

	@Override
	public GameRules createGameRules(Game game, Board board)
	{
		return new TTTGameRules(game, board);
	}

	@Override
	public MoveObtainer createMoveObtainer()
	{
		return new SimulationMoveObtainer(new TTTMoveObtainerImplementor());
	}
	
	

}
